home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 05.zip
/
BS1 part 5
/
PDraw3.0.adf
/
pdraw_rex.lzh
/
DeleteRange.pdrx
< prev
next >
Wrap
Text File
|
1992-06-15
|
931b
|
41 lines
/*
@N
Use this Genie to delete a range of pages.
*/
cr = '0a'x
first = pdm_DocFirstPage()
last = pdm_DocLastPage()
form = "from:"first'0a'x "to:"last
form = pdm_GetForm("Enter Range Of Pages:", 5, form)
if form = '' then exit_msg()
parse var form startpage'0a'x endpage
if ~DataType(startpage, 'N') then exit_msg('Invalid Input:'startpage)
if ~DataType(endpage, 'N') then exit_msg('Invalid Input:'endpage)
call pdm_AutoUpdate(0)
if last = 0 then exit_msg()
if startpage < first then exit_msg('Invalid Range')
else if startpage > last then exit_msg('Invalid Range')
if endpage < first then exit_msg('Invalid Range')
else if endpage > last then exit_msg('Invalid Range')
if startpage > endpage then exit_msg('Invalid Range')
call pdm_DeletePage(startpage, endpage - startpage + 1)
exit_msg()
exit_msg:
do
parse arg message
if message ~= '' then call pdm_Inform(1, message,)
call pdm_AutoUpdate(1)
exit
end